package com.wgu.crawl2.service.impl;

import com.wgu.crawl2.repo.XBQGTypeRepository;
import com.wgu.crawl2.service.XBQGTypeService;
import com.wgu.xbqg.XBQGType;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.transaction.Transactional;

/**
 * @Author: w
 * @Date: 2019/6/28 9:05
 * @Version 1.0
 */
@Service
public class XBQGTypeServiceImpl implements XBQGTypeService {
    @Resource
    private XBQGTypeRepository xbqgTypeRepository;

    @Override
    @Transactional
    public XBQGType save(XBQGType xbqgType) {
        return xbqgTypeRepository.save(xbqgType);
    }

    @Override
    public XBQGType findByName(String name) {
        return xbqgTypeRepository.findByName(name);
    }
}
